/*
 * @Author: anchenkai 
 * @Date: 2022-03-03 10:35:51 
 * @Last Modified by: anchenkai
 * @Last Modified time: 2022-03-03 14:31:19
 */
import request from '@/utils/request';

// 分页模糊查询通知通告信息

export function reqGetList(data) {
    return request({
        url: '/drug/inform/get',
        method: 'get',
        params: data
    })
}

// 添加 || 修改 通知通告
export function reqAddOrEdit(data) {
    if (data.id) {
        return request({
            url: '/drug/inform/update',
            method: 'put',
            data
        })
    } else {
        return request({
            url: '/drug/inform/add',
            method: 'post',
            data
        })
    }
}

// 获取大队信息
export function reqGetGroupList() {
    return request({
        url: '/drug/dept/get',
        method: 'get',
    })
}

// 根据id删除通告信息
export function reqDelete(id) {
    return request({
        url: `/drug/inform/delete/${id}`,
        method: 'delete'
    })
}

// 根据id更改下发状态并添加中间表
export function reqChange(data) {
    return request({
        url: '/drug/inform/change',
        method: 'put',
        data
    })
}